package com.base.controller.web;

import com.base.po.param.NetState;
import com.base.self.service.CommissionService;
import com.base.service.SubscribersService;
import com.base.service.UsersReleaseConfigService;
import com.base.service.UsersService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.math.BigDecimal;
import java.util.Optional;

@RestController
@RequestMapping("/test")
public class TestCommissionController {
    final CommissionService commissionService;
    final UsersReleaseConfigService usersReleaseConfigService;
    final UsersService usersService;
    final SubscribersService subscribersService;

    public TestCommissionController(CommissionService commissionService, UsersReleaseConfigService usersReleaseConfigService, UsersService usersService, SubscribersService subscribersService) {
        this.commissionService = commissionService;
        this.usersReleaseConfigService = usersReleaseConfigService;
        this.usersService = usersService;
        this.subscribersService = subscribersService;
    }

    @RequestMapping("/agentCommission")
    public NetState agentCommission(String orderNo, String userId, BigDecimal money) {

        commissionService.agentCommission(orderNo, userId, money);

        return new NetState();
    }
}
